package com.ftg.learn.smhtml.mapper;

import org.apache.ibatis.jdbc.SQL;

public class AboutSql {

	public String getCountSql(String id) {

		return new SQL() {{
			SELECT("* ");
			FROM("about");
			if(null != id && !"".equals(id)) {
				WHERE("aid like concat(#{id},'%') ");
			}
		}}.toString();
	}


	public String getShowAllSql(String id,int begin,int end) {

		return new SQL() {{
			SELECT("* ");
			FROM("about");
			if(null != id && !"".equals(id)) {
				WHERE("aid like concat(#{arg0},'%') ");
			}

		}}.toString() + " limit #{begin},#{end}";
	}




}
